﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManufacturerList.aspx.cs" Inherits="weba.Sales.ManufacturerList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
          <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="30" background="../Images/tab_05.gif">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="12" height="30">
                                        <img src="../Images/tab_03.gif" width="12" height="30" />
                                    </td>
                                    <td>
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="46%" valign="middle">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td>
                                                                <div align="center">
                                                                    <img src="../images/tb.gif" width="16" height="16" /></div>
                                                            </td>
                                                            <td width="95%">
                                                                <span class="titleBold12px">厂家列表</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td width="54%" align="right">
                                                    <table border="0" align="right" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td width="60">
                                                                <table width="87%" border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td>
                                                                            &nbsp;
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                            <td width="60">
                                                                <table width="90%" border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td>
                                                                            <div align="center">
                                                                                <img src="../images/add.gif" width="14" height="14" /></div>
                                                                        </td>
                                                                        <td>
                                                                            <div align="center">
                                                                                <a href="ManufacturerAdd.aspx">新增</a></div>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                            <td width="52">
                                                                <table width="88%" border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td>
                                                                            <div align="center">
                                                                                <img src="../images/delete.gif" width="14" height="14" /></div>
                                                                        </td>
                                                                        <td>
                                                                            <div align="center">
                                                                                <asp:LinkButton ID="lbtnDel" runat="server" OnClick="lbtnDel_Click" OnClientClick="return confirm('删除后无法恢复，您确认删除此记录吗？')">删除</asp:LinkButton>
                                                                            </div>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td width="16" height="30">
                                        <img src="../Images/tab_07.gif" width="16" height="30" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="8" background="../images/tab_12.gif">
                                        &nbsp;
                                    </td>
                                    <td align="center">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td align="center">
                                                    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td align="left">
                                                                说明：如果销售订单中有此厂家的订单，则不能删除此厂家信息。
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="right">
                                                                <asp:Label ID="lblFileName" runat="server" Visible="False"></asp:Label>
                                                                <asp:Label ID="lblStrWhere" runat="server" Visible="False"></asp:Label>
                                                                <asp:Label ID="lblRootDepartmentID" runat="server" Visible="False"></asp:Label>
                                                                厂家名称：<asp:TextBox ID="txtManufacturerName" runat="server"></asp:TextBox>
                                                                厂家代码：<asp:TextBox ID="txtManufacturerCode" runat="server"></asp:TextBox>
                                                                联系人：<asp:TextBox ID="txtContactPersonName" runat="server"></asp:TextBox>
                                                                <br />
                                                                电话：<asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                                                                手机：<asp:TextBox ID="txtCellPhone" runat="server"></asp:TextBox>
                                                                地址：<asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
                                                                <br />
                                                                <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
                                                                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" />
                                                                分页页数：<asp:TextBox ID="txtPageSize" runat="server" Width="50px"></asp:TextBox>
                                                               
                                                                </AjaxControlToolkit:FilteredTextBoxExtender>
                                                                <asp:Button ID="btnSetPageSize" runat="server" Text="确定" OnClick="btnSetPageSize_Click" />
                                                                <asp:Button ID="btnExportExcel" runat="server" Text="导出Excel" OnClick="btnExportExcel_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td width="80%">
                                                               
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" Width="98%"
                                                        DataKeyNames="ManufacturerID" OnRowDataBound="myGridView_RowDataBound" OnRowDeleting="myGridView_RowDeleting">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="选择">
                                                                <HeaderTemplate>
                                                                    <asp:CheckBox ID="chkSelectAll" runat="server" AutoPostBack="True" OnCheckedChanged="chkSelectAll_CheckedChanged"
                                                                        ToolTip="全选/取消全选" />
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkSelect" runat="server" />
                                                                </ItemTemplate>
                                                                <HeaderStyle Width="30px" />
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="ManufacturerID" HeaderText="ID" ReadOnly="True"></asp:BoundField>
                                                            <asp:BoundField DataField="ManufacturerName" HeaderText="厂家名称"></asp:BoundField>
                                                            <asp:TemplateField HeaderText="厂家代码">
                                                                <ItemTemplate>
                                                                    <asp:DataList ID="myDataList" runat="server" RepeatDirection="Horizontal" RepeatColumns="5"
                                                                        ShowFooter="False" ShowHeader="False">
                                                                        <ItemTemplate>
                                                                            <%# Eval("Code")%>
                                                                        </ItemTemplate>
                                                                        <SeparatorTemplate>
                                                                            ,</SeparatorTemplate>
                                                                    </asp:DataList>
                                                                </ItemTemplate>
                                                                <ItemStyle HorizontalAlign="Center" />
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="Address" HeaderText="地址"></asp:BoundField>
                                                            <asp:BoundField DataField="ContactPersonName" HeaderText="联系人"></asp:BoundField>
                                                            <asp:BoundField DataField="Phone" HeaderText="电话" ReadOnly="True"></asp:BoundField>
                                                            <asp:BoundField DataField="CellPhone" HeaderText="手机" ReadOnly="True"></asp:BoundField>
                                                            <asp:HyperLinkField DataNavigateUrlFields="ManufacturerID" DataNavigateUrlFormatString="ManufacturerEdit.aspx?ManufacturerID={0}"
                                                                HeaderText="编辑" Text="编辑">
                                                                <ItemStyle Width="30px" />
                                                            </asp:HyperLinkField>
                                                            <asp:TemplateField HeaderText="厂家信息">
                                                                <ItemTemplate>
                                                                    <a href="javascript:void(0)" onclick="OpenModalDialog('ManufacturerShow.aspx?ManufacturerID=<%# Eval("ManufacturerID") %>');">
                                                                        查看</a>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="60px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="lbtnDel" runat="server" CausesValidation="False" CommandName="Delete"
                                                                        OnClientClick="return confirm('删除后无法恢复，您确认删除此记录吗？')" Text="删除"></asp:LinkButton>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="30px" />
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                   
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td width="8" background="../images/tab_15.gif">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="35" background="../images/tab_19.gif">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="12" height="35">
                                        <img src="../images/tab_18.gif" width="12" height="35" />
                                    </td>
                                    <td align="center">
                                        &nbsp;
                                    </td>
                                    <td width="16">
                                        <img src="../images/tab_20.gif" width="16" height="35" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnExportExcel" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
